﻿using System;
using System.Collections;
using System.Data;
using System.Xml.Serialization;

namespace IBatisNet.DataMapper.Configuration.Statements
{
    /// <summary>
    /// Summary description for Statement.
    /// </summary>
    [Serializable]
    [XmlRoot("statement", Namespace = "http://ibatis.apache.org/mapping")]
    public class Statement
    {
        #region Properties
        /// <summary>
        /// Id 唯一性标志
        /// </summary>
        [XmlAttribute("id")]
        public string Id { get; set; }

        /// <summary>
        /// 对应输出的SQL
        /// </summary>
        [XmlAttribute("sqlTag")]
        public string SqlTag { get; set; }

        /// <summary>
        /// 参数名
        /// </summary>
        [XmlAttribute("parameterName")]
        public string ParameterName { get; set; }
        
        /// <summary>
        /// 参数类型
        /// </summary>
        [XmlAttribute("parameterType")]
        public string ParameterType { get; set; }

        /// <summary>
        /// 用于对比的值
        /// </summary>
        [XmlAttribute("compareValue")]
        public string CompareValue { get; set; }
        #endregion
    }

    public enum CompareType
    {
        IsEqual,
        IsGreaterEqual,
        IsGreaterThan,
        IsLessEqual,
        IsLessThan,
        IsNotEqual,
        IsEmpty,
        IsNotEmpty,
        IsNull,
        IsNotNull
    }
}
